package com.ruoyi.mes.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mes.mapper.NewEnergyEfficiencyMapper;
import com.ruoyi.mes.domain.NewEnergyEfficiency;
import com.ruoyi.mes.service.INewEnergyEfficiencyService;

/**
 * 设备能效KPIService业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-14
 */
@Service
public class NewEnergyEfficiencyServiceImpl implements INewEnergyEfficiencyService 
{
    @Autowired
    private NewEnergyEfficiencyMapper newEnergyEfficiencyMapper;

    /**
     * 查询设备能效KPI
     * 
     * @param kpiId 设备能效KPI主键
     * @return 设备能效KPI
     */
    @Override
    public NewEnergyEfficiency selectNewEnergyEfficiencyByKpiId(Long kpiId)
    {
        return newEnergyEfficiencyMapper.selectNewEnergyEfficiencyByKpiId(kpiId);
    }

    /**
     * 查询设备能效KPI列表
     * 
     * @param newEnergyEfficiency 设备能效KPI
     * @return 设备能效KPI
     */
    @Override
    public List<NewEnergyEfficiency> selectNewEnergyEfficiencyList(NewEnergyEfficiency newEnergyEfficiency)
    {
        return newEnergyEfficiencyMapper.selectNewEnergyEfficiencyList(newEnergyEfficiency);
    }

    /**
     * 新增设备能效KPI
     * 
     * @param newEnergyEfficiency 设备能效KPI
     * @return 结果
     */
    @Override
    public int insertNewEnergyEfficiency(NewEnergyEfficiency newEnergyEfficiency)
    {
        return newEnergyEfficiencyMapper.insertNewEnergyEfficiency(newEnergyEfficiency);
    }

    /**
     * 修改设备能效KPI
     * 
     * @param newEnergyEfficiency 设备能效KPI
     * @return 结果
     */
    @Override
    public int updateNewEnergyEfficiency(NewEnergyEfficiency newEnergyEfficiency)
    {
        return newEnergyEfficiencyMapper.updateNewEnergyEfficiency(newEnergyEfficiency);
    }

    /**
     * 批量删除设备能效KPI
     * 
     * @param kpiIds 需要删除的设备能效KPI主键
     * @return 结果
     */
    @Override
    public int deleteNewEnergyEfficiencyByKpiIds(Long[] kpiIds)
    {
        return newEnergyEfficiencyMapper.deleteNewEnergyEfficiencyByKpiIds(kpiIds);
    }

    /**
     * 删除设备能效KPI信息
     * 
     * @param kpiId 设备能效KPI主键
     * @return 结果
     */
    @Override
    public int deleteNewEnergyEfficiencyByKpiId(Long kpiId)
    {
        return newEnergyEfficiencyMapper.deleteNewEnergyEfficiencyByKpiId(kpiId);
    }
}
